package com.tanjie.blackbean.pojo.response;

import lombok.Getter;

/**
 * @author: tanjie
 * @date: 2022-04-07
 **/
@Getter
public enum ExceptionCode implements IResult {

    NO_HANDLER_FOUND_EXCEPTION("404没找到请求", 404),

    BIND_EXCEPTION("请求参数绑定异常(BindException)", -1),

    HTTP_MESSAGE_CONVERSION_EXCEPTION("消息转换异常(HttpMessageConversionException)", -1),

    NOT_PREDICT("系统内部未预知异常", -2),

    EXECUTE_SQL_ERROR("数据访问发生异常", -3);

    final String message;

    final Integer code;

    ExceptionCode(String message, Integer code) {
        this.message = message;
        this.code = code;
    }

}
